package cj.web.prize.dao;
/*
 *  
 *  
*/
import java.util.List;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;
import net.paoding.rose.jade.annotation.SQLParam;
import cj.web.prize.domain.Prize;

/**
 * 
 * @author 
 *
 */
@DAO
public interface PrizeDAO{
	
    //以下SQL是用来判断活动是否开始
    @SQL("SELECT COUNT(1) FROM Prize "
    		+ "WHERE id =:1 "
    		+ "AND StartAT < date_format(:2,'%Y-%m-%d %H:%i:%s') "
    		+ "AND EndAT > date_format(:2,'%Y-%m-%d %H:%i:%s')")
    int queryByIdAndDate(int id,String date);
}